package com.cx.mall.common.entity.user.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.cx.mall.common.util.EncryptTypeHandler;
import lombok.Getter;
import lombok.Setter;

import java.io.Serial;
import java.io.Serializable;

/**
 * <p>
 * 用户收货地址表
 * </p>
 *
 * @author zs
 * @since 2025-08-07
 */
@Getter
@Setter
@TableName(value = "user_receive_address",autoResultMap = true)
public class UserReceiveAddress implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

      @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 用户ID
     */
    @TableField("user_id")
    private Long userId;

    /**
     * 收货人名称
     */
    @TableField("name")
    private String name;

    /**
     * 收货人电话
     */
    @TableField("phone_number")
    private String phoneNumber;

    /**
     * 是否为默认:1-默认,0-不默认
     */
    @TableField("default_status")
    private Integer defaultStatus;

    /**
     * 邮政编码
     */
    @TableField("post_code")
    private String postCode;

    /**
     * 省份/直辖市
     */
    @TableField("province")
    private String province;

    /**
     * 城市
     */
    @TableField("city")
    private String city;

    /**
     * 区
     */
    @TableField("region")
    private String region;

    /**
     * 详细地址(街道)
     */
    @TableField(value = "detail_address",typeHandler = EncryptTypeHandler.class)
    private String detailAddress;
}
